<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            border: 1px solid black;
            margin: 10px;
        }
        /* 值是xxx */
        /* div[aaa="123"]{
            background-color: red;
        } */

        /* 以xxx开头 */
        /* div[aaa^="123"]{
            background-color: red;
        } */

        /* 以xxx结尾 */
        /* div[aaa$="123"]{
            background-color: red;
        } */

        /* 包含xxx */
        div[aaa*="123"]{
            background-color: red;
        }

        .div1{
            background-color: green;
        }
        .div2{
            border-radius: 50%;
        }
    </style>
</head>
<body>
    <div class="div1 div2"></div>
    <div aaa="123456"></div>
    <div aaa="123" ></div>
    <div aaa="456123" ></div>
    <div aaa="456123456"></div>
    <div aaa></div>
</body>
</html>